using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region Message

	/// <summary>
	/// Message object for NHibernate mapped table 'Message'.
	/// </summary>
	public class Message
	{
		#region Member Variables
		
		protected int _id;
		protected int _userId;
		protected string _userName;
		protected string _contents;
		protected DateTime _addDate;
		protected bool _isRead;
		protected bool _isReply;
		protected string _replyCon;
		protected DateTime _replyDate;

		#endregion

		#region Constructors

		public Message() { }

		public Message( int userId, string userName, string contents, DateTime addDate, bool isRead, bool isReply, string replyCon, DateTime replyDate )
		{
			this._userId = userId;
			this._userName = userName;
			this._contents = contents;
			this._addDate = addDate;
			this._isRead = isRead;
			this._isReply = isReply;
			this._replyCon = replyCon;
			this._replyDate = replyDate;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual int UserId
		{
			get { return _userId; }
			set { _userId = value; }
		}

		public  virtual string UserName
		{
			get { return _userName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserName", value, value.ToString());
				_userName = value;
			}
		}

		public  virtual string Contents
		{
			get { return _contents; }
			set
			{
				if ( value != null && value.Length > 4000)
					throw new ArgumentOutOfRangeException("Invalid value for Contents", value, value.ToString());
				_contents = value;
			}
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		public  virtual bool IsRead
		{
			get { return _isRead; }
			set { _isRead = value; }
		}

		public  virtual bool IsReply
		{
			get { return _isReply; }
			set { _isReply = value; }
		}

		public  virtual string ReplyCon
		{
			get { return _replyCon; }
			set
			{
				if ( value != null && value.Length > 4000)
					throw new ArgumentOutOfRangeException("Invalid value for ReplyCon", value, value.ToString());
				_replyCon = value;
			}
		}

		public  virtual DateTime ReplyDate
		{
			get { return _replyDate; }
			set { _replyDate = value; }
		}

		

		#endregion
	}
	#endregion
}